// 一个类型（struct）实现多个接口方法

package main

import (
	"fmt"
)

func main() {
	d := Dog{}

	var sayer Sayer
	var mover Mover

	sayer = d
	mover = d

	sayer.say()
	mover.move()
}

type Sayer interface {
	say()
}

type Mover interface {
	move()
}

type Dog struct {
	name string
}

func (d Dog) say() {
	fmt.Println("小狗汪汪汪")
}

func (d Dog) move() {
	fmt.Println("小狗在移动")
}
